﻿using System;
using UnityEngine;

public class USTimelineBase : MonoBehaviour
{
    public float elapsedTime;

    public virtual void ManuallySetTime(float sequencerTime)
    {
    }

    public virtual void PauseTimeline()
    {
    }

    public virtual void Process(float sequencerTime)
    {
    }

    public virtual void Reset()
    {
    }

    public virtual void ResumeTimeline()
    {
    }

    public virtual void StartTimeline()
    {
    }

    public virtual void StopTimeline()
    {
    }

    public Transform AffectedObject
    {
        get
        {
            USTimelineContainer component = base.transform.parent.GetComponent<USTimelineContainer>();
            if (component == null)
            {
                Debug.LogWarning(base.name + "有问题：父节点没有添加USTimeLineBase组件. " + base.name + "的父节点是 : " + base.transform.parent.name);
            }
            return component.AffectedObject;
        }
    }

    public USSequencer Sequence
    {
        get
        {
            return this.TimelineContainer.Sequence;
        }
    }

    public USTimelineContainer TimelineContainer
    {
        get
        {
            USTimelineContainer component = base.transform.parent.GetComponent<USTimelineContainer>();
            if (component == null)
            {
                Debug.LogWarning(base.name + "有问题：父节点没有添加USTimelineContainer组件. " + base.name + "的父节点是: " + base.transform.parent.name);
            }
            return component;
        }
    }
}

